import { defineStore } from 'pinia'
export const useMarketInfoStore = defineStore('marketing', {
  state: () => {
    return {
        MarketIndex: JSON.parse(sessionStorage.getItem('MarketIndex')) || "",
    }
  },
  actions:{
    setMarketIndex(log){
      this.MarketIndex = log;
      sessionStorage.setItem(`MarketIndex`, JSON.stringify(log))
    },
    removeMarketIndex(){
      this.MarketIndex = "";
      sessionStorage.removeItem(`MarketIndex`)
    }
  },
  getters:{
    getMarketIndex(){
      return this.MarketIndex;
    }
  }
})

